<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>确认/取消弹窗按钮</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
</head>
<body class="bg-gray-100 flex justify-center items-center h-screen">
    <button onclick="showConfirm()" class="bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
        显示确认/取消弹窗
    </button>
    <script>
        function showConfirm() {
            var result = confirm("请确认是否执行此操作？");
            if (result) {
                console.log("用户点击了确定");
            } else {
                console.log("用户点击了取消");
            }
        }
    </script>
</body>
</html>
